<template>
	<view class="rh-btn-container">
		<u-button class="rh-submit-btn" :text="btnTxt" @click="submit" :loading="submit_loading"></u-button>
	</view>
</template>

<script>
	export default {
		props: {
			text: String,
		},
		computed: {
			btnTxt(){
				return this.text
			},
		},
		data() {
			return {
				submit_loading: false,
			};
		},
		methods: {
			submit(){
				let _self = this
				_self.submit_loading = true
				_self.$emit('submit')
				setTimeout(() => {
					_self.submit_loading = false
				}, 4000)
			},
		}
	}
</script>

<style scoped lang="scss">
	.rh-btn-container{
		position: fixed;
		bottom: 30rpx;
		left: 0;
		right: 0;
		z-index: 990;
		.rh-submit-btn{
			
		}
	}
</style>
